﻿/////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//Copyright (c) 2009 foldier inc.
//
//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 
//associated documentation files (the "Software"), to deal in the Software without restriction, including 
//without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
//copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the 
//following conditions:
//
//The above copyright notice and this permission notice shall be included in all copies or substantial portions
//of the Software.
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 
//WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
//ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
//LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
//INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 
//IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////

using System;
using System.Data;
using System.Xml;
//using System.Xml.XPath;
using System.Net;
using System.Configuration;
using System.Collections.Generic;
using System.Text.RegularExpressions;

#if SILVERLIGHT
using System.Windows.Browser;
#else
using System.Web;
#endif


namespace foldier.API
{
	/// <summary>
    /// BaseItem derived classes (ItemLink, ItemSPression and Itemfolder) represent the different objects the API calls may return
	/// </summary>
    public class BaseItem
	{
		#region Protected Data Members

		private long m_id = -1;
		private string m_name = string.Empty;
		private string m_link = string.Empty;
		private string m_thumb = string.Empty;
		private string m_comments = string.Empty;
		private string m_sourceName = string.Empty;
		private string m_desc = string.Empty;
		private DateTime m_modified = DateTime.Now;

		#endregion

		#region Properties

		/// <summary>
		/// Gets or sets ID
		/// </summary>
        public long ID { get { return m_id; } set { m_id = value; } }
		/// <summary>
        ///  Gets or sets Name
		/// </summary>
        public string Name { get { return m_name; } set { m_name = value; } }
		/// <summary>
        ///  Gets or sets Link
		/// </summary>
        public string Link { get { return m_link; } set { m_link = value; } }
		/// <summary>
        ///  Gets or sets Comments
		/// </summary>
        public string Comments { get { return m_comments; } set { m_comments = value; } }
		/// <summary>
        ///  Gets or sets SourceName
		/// </summary>
        public string SourceName { get { return m_sourceName; } set { m_sourceName = value; } }
		/// <summary>
        ///  Gets or sets Description
		/// </summary>
        public string Description { get { return m_desc; } set { m_desc = value; } }
		/// <summary>
        ///  Gets or sets Thumbnail picture
		/// </summary>
        public string Thumbnail { get { return m_thumb; } set { m_thumb = value; } }
		/// <summary>
        ///  Gets or sets Modified datetime
		/// </summary>
        public DateTime Modified { get { return m_modified; } set { m_modified = value; } }

		#endregion

        /// <summary>
        /// Constructor
        /// </summary>
		public BaseItem()
		{
			m_id = -1;
		}

        /// <summary>
        /// onstructor
        /// </summary>
        /// <param name="id">BaseItem ID</param>
		public BaseItem(long id)
		{
			m_id = id;
		}
	}
}
